<?php 
function domande(){

	$sql="SELECT * FROM domanda ";
	 $result =mysql_query($sql);
	 if (mysql_num_rows($result))
	{
	 while ($domande=mysql_fetch_assoc($result))
	 {
?>
<?php if ($domande ['id']== $_GET ['domanda_id'] ){
	$sql="update domanda set voti=(voti+1) where id=$_GET[domanda_id]";
		mysql_query($sql);
		$domande ['voti'] = $domande ['voti']+1;
}
?>

<div class="question">
  <div class="interested_block" id="block_15648">
    <div class="interested_mark few_interests" id="mark_15648">
      <?php echo $domande['voti'];?>&nbsp;
    </div>

    <div class="interested_link"><a href="index.php?action=incrementa&domanda_id<?php echo $domande ['id'];?>">vota</a></div>
  </div>

  <h2><a href="http://www.askeet.com/question/free-casino"><?php echo $domande['titolo'];?></a></h2>

  <div class="subtitle">
  asked by <a href="http://www.askeet.com/user/carlhart">carlhart</a> on March 9, 2011 5:27 AM  </div>

  <div class="question_body">
    <?php echo $domande['testo'];?>
    <div class="options">

          <a href="http://www.askeet.com/question/free-casino">answer it</a>    
    &nbsp;-&nbsp;

          tags: <a href="http://www.askeet.com/tag/free">free</a> + <a href="http://www.askeet.com/tag/casino">casino</a> + <a href="http://www.askeet.com/tag/no">no</a> + <a href="http://www.askeet.com/tag/deposit">deposit</a> + <a href="http://www.askeet.com/tag/bonus">bonus</a>    
    </div>

    <div class="options" id="report_question_15648">
      <a href="#" onclick="new Effect.BlindDown('login', {duration:0.5});; return false;">[report to moderator]</a>          </div>

  </div>
</div>
<?php 
	 }
}
}
domande();
?>